/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package session.TX;

import entity.RewardItem;
import entity.RewardVoucher;
import java.util.Date;
import java.util.List;
import javax.ejb.Remote;

/**
 *
 * @author AdminNUS
 */
@Remote
public interface ULPSBRemote {

    
   public Integer calculateLoyaltyPoints(Date currentTrans, String customerEmail, Double subtotal);
   public boolean compareMostRecentTransactionDate(Date recentTrans,Date currentTrans);
   public void awardPoints(long userID, int pointsToAward);
   public boolean stalkerholderAwardPoints(String stakeholderName, Integer points, String customerEmail);
   
   
   
   
       public void stakeholderCreateRewardItem(
                 String stakeholder,
                 String reward_Name,
                 String reward_Description,
                 Integer reward_Cost,
                 Integer vouchers_left,
                 boolean unlimitedVouchers
       );
       
       public void stakeholderDeleteRewardItem(long rewardItem_id);
       public List<RewardItem> getRewardsByStakeholder(String stakeholderName);
       public String buyVoucher(String customerEmail, long rewardItem_id);
       public void redeemVoucher(long voucher_id);
       public List<RewardVoucher> getVouchersByCustomer(long customerID);
       public List<RewardVoucher> getVouchersByCustomerAndStakeholder(String customerEmail, String stakeholderName);
       
       public List<RewardItem> getAllRewards();  
       public Integer getUserLoyaltyPoints(String email);
       public String getUserPointsExpiryStatus(String email);
       
       public void createPointPurchaseEntry_Stakeholder(Date date, String buyer, Double amountPaid);
       public void createPointPurchaseEntry_Users(Date date, String buyer, Double amountPaid);

    public entity.Stakeholder findStakeholderByName(java.lang.String stakeholderName);

    public boolean setStakeholderLoyaltyPoints(java.lang.String stakeholderName, java.lang.Integer loyaltyPoint);

    public boolean setUserLoyaltyPoints(java.lang.String customerEmail, java.lang.Integer loyaltyPoint);

    public entity.Users findCustomer(java.lang.String customerEmail);
       
   
}
